﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_QC_IQC_ORDER_ITEM_DETAIL
// * CreateDate    : 2012/4/15 1:16:53
// * Creater       : CodeSmith
// * LastChangeDate: 2012/4/15 1:16:53
// * LastChanger   : 2012/4/15 1:16:53
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class QcIqcOrderItemDetailEntity : EntityBase
    {
        public QcIqcOrderItemDetailTable TableSchema
        {
            get
            {
                return QcIqcOrderItemDetailTable.Current;
            }
        }

        public QcIqcOrderItemDetailEntity()
        {

        }

        public QcIqcOrderItemDetailEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.OrderItemDetailId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ITEM_DETAIL_ID"]));
            this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
            this.OrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ITEM_ID"]));
            this.Result = Convert.ToInt32(CommonFunctions.ToObject(dr["RESULT"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.NgCode = Convert.ToString(CommonFunctions.ToObject(dr["NG_CODE"]));
            this.Advice = Convert.ToString(CommonFunctions.ToObject(dr["ADVICE"]));
            this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
        }

        public QcIqcOrderItemDetailEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.OrderItemDetailId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ITEM_DETAIL_ID"]));
            this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
            this.OrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ITEM_ID"]));
            this.Result = Convert.ToInt32(CommonFunctions.ToObject(dr["RESULT"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.NgCode = Convert.ToString(CommonFunctions.ToObject(dr["NG_CODE"]));
            this.Advice = Convert.ToString(CommonFunctions.ToObject(dr["ADVICE"]));
            this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return QcIqcOrderItemDetailTable.Current;
            }
        }

        #region Perporty List
        public string OrderItemDetailId
        {
            get { return Convert.ToString(GetData(QcIqcOrderItemDetailTable.C_ORDER_ITEM_DETAIL_ID)); }
            set { SetData(QcIqcOrderItemDetailTable.C_ORDER_ITEM_DETAIL_ID, value); }
        }

        public string OrderId
        {
            get { return Convert.ToString(GetData(QcIqcOrderItemDetailTable.C_ORDER_ID)); }
            set { SetData(QcIqcOrderItemDetailTable.C_ORDER_ID, value); }
        }

        public string OrderItemId
        {
            get { return Convert.ToString(GetData(QcIqcOrderItemDetailTable.C_ORDER_ITEM_ID)); }
            set { SetData(QcIqcOrderItemDetailTable.C_ORDER_ITEM_ID, value); }
        }

        public int Result
        {
            get { return Convert.ToInt32(GetData(QcIqcOrderItemDetailTable.C_RESULT)); }
            set { SetData(QcIqcOrderItemDetailTable.C_RESULT, value); }
        }

        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(QcIqcOrderItemDetailTable.C_QTY)); }
            set { SetData(QcIqcOrderItemDetailTable.C_QTY, value); }
        }

        public string NgCode
        {
            get { return Convert.ToString(GetData(QcIqcOrderItemDetailTable.C_NG_CODE)); }
            set { SetData(QcIqcOrderItemDetailTable.C_NG_CODE, value); }
        }

        public string Advice
        {
            get { return Convert.ToString(GetData(QcIqcOrderItemDetailTable.C_ADVICE)); }
            set { SetData(QcIqcOrderItemDetailTable.C_ADVICE, value); }
        }

        public string Description
        {
            get { return Convert.ToString(GetData(QcIqcOrderItemDetailTable.C_DESCRIPTION)); }
            set { SetData(QcIqcOrderItemDetailTable.C_DESCRIPTION, value); }
        }

        #endregion
    }


}

